import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import Components from 'unplugin-vue-components/vite'
import AutoImports from "unplugin-auto-import/vite";
import {dirResolver, DirResolverHelper} from "vite-auto-import-resolvers";
import Pages from 'vite-plugin-pages'
import path from 'path'; // 确保导入path模块
export default defineConfig({
    base: "./",
    plugins: [vue(),
        Pages(),
        Components(),
        // AutoImport(),
        DirResolverHelper(),
        AutoImports({
            imports: ["vue"],
            resolvers: [dirResolver()],
        }),
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src')
        }
    },
    esbuild: {
        drop: ['console', 'debugger'],
    },
});
